"""
@author: xxw
@file: 05.装饰类.py
@time: 2023/6/13 9:43
"""

def outer(cls):
    def inner(*args,**kwargs):
        print(f"class name is {cls.__name__}")
        return cls(*args, **kwargs)
    return inner

@outer      # A = outer(A)
class A:
    def __init__(self, name):
        self.name = name

a1 = A("sc")